package HttpClient;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.junit.Test;
import java.io.IOException;



/**
 * Created by 王念 on 2016/4/2.
 */
public class test {


    @Test
    public void test() throws IOException, CloneNotSupportedException {
        for(int i=0;i<1000;i++){
            String url="http://www.panda.tv/55621?"+i;
            CloseableHttpClient httpclient = HttpClients.createDefault();
            HttpGet httpGet=new HttpGet(url);
            httpGet.setHeader("User-Agent","Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; 360SE)");
            HttpResponse response=httpclient.execute(httpGet);
            httpclient.close();
            httpGet.clone();
        }



    }
}
